// 文件下载
export function doDownload(url, fileName, extName) {
  let xml = new XMLHttpRequest();
  xml.open("GET", url, true);
  xml.responseType = "blob";
  xml.onload = () => {
    let url = window.URL.createObjectURL(xml.response);
    let a = document.createElement("a");
    a.href = url;
    a.download = `${fileName}.${extName}`;
    a.style.display = "none";
    a.click();
  };
  xml.send();
}
